var picArr = ["slave_market", "empty_pockets","beer_disp", "battle", "comp_battle", "profile_icon", "mail_icon", "ranklist_icon","edit_profile_active"];

function onImageHover(image)
{
	for (var i = 0; i < picArr.length; i++) {
		
	var oldSrc = "images/" + picArr[i] + ".png";
	var newSrc = "images/" + picArr[i] + "_hover.png";
		if(image.src.match(oldSrc) == oldSrc)
		{
			image.src = newSrc;
		
		} else if (image.src.match(newSrc) == newSrc) {
			image.src = oldSrc;
		}
	}
};


$(document).ready(function(){

	var url = window.location.href;
	
	var match = url.match("[?]action=.*");
	if(match != null) {
		var action = match[0].split("=");
		var div = action[1].split("&");
		$('#'+div[0]).show();
	}
	
	$(".close").on("click", function() {
		
		window.location.href = "office.php";
	});
	
});


